﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Coolite.Ext.Web;
using ENT.PM.Core;
using ENT.PM.Core.Core;

public partial class Tareas_Tareas : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                int idUsuario, idRol;
                int.TryParse(Session["IdRol"].ToString(), out idUsuario);
                int.TryParse(Session["IdRol"].ToString(), out idRol);
                var criterioNot = ENT.PM.Core.Tareas.TareaCriterio.NewEditableRoot();
                criterioNot.IdUsuario = 1;
                var listaNotificaciones = ENT.PM.Core.Tareas.TareaLista.GetTareaList(criterioNot);
                sTareas.DataSource = listaNotificaciones;
                sTareas.DataBind();
            }
        }
        catch (Exception ex)
        {
            Util.RegistarLog(ex);
        }
        
    }

    protected void btnNuevo_click(object sender, AjaxEventArgs e)
    {
        try
        {
            //wucPerfiles1.Show(e.ExtraParams["operacion"].ToString());
            wListadoTareas.Show();
        }
        catch (Exception)
        {

            throw;
        }
    }
}
